﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.franchise.transactions {
    import Engine.Events.*;
    import Engine.Transactions.*;

    public class TFranchiseDailyBonus extends Transaction {

        private var m_franchise:String;
        private var m_result:Object;

        public function TFranchiseDailyBonus(_arg1:String){
            this.m_franchise = _arg1;
            super();
        }
        override public function perform():void{
            signedCall("FranchiseService.onCollectDailyBonus", this.m_franchise);
        }
        override protected function onComplete(_arg1:Object):void{
            this.m_result = _arg1;
        }
        override protected function onAmfComplete(_arg1:Object):void{
            m_rawResult = _arg1;
            if (_arg1){
                if (_arg1.errorType == NO_ERROR){
                    logEvent("Complete");
                    if (_arg1.data != null){
                        this.onComplete(_arg1.data);
                    };
                } else {
                    if (_arg1.errorData){
                        logEvent(((("Error " + _arg1.errorType) + " ") + _arg1.errorData));
                    } else {
                        logEvent(("Error " + _arg1.errorType));
                    };
                    onFault(_arg1.errorType, _arg1.errorData);
                };
            };
            dispatchEvent(new TransactionEvent(TransactionEvent.COMPLETED, this));
        }

    }
}//package Modules.franchise.transactions 
